package xj.graph2d.graph;

import java.awt.geom.Point2D;
import java.io.PrintWriter;

public interface GraphEdge <NodeType extends GraphNode>
  extends GraphComponent {

  public NodeType getSource();

  public NodeType getDestination();

  public void setSource(NodeType node);

  public void setDestination(NodeType node);

  public boolean isHyperEdge();

  public int getEdgeType();

  public void setEdgeType(int type);

  public boolean isDirected();

  public void setDirected(boolean directed);

  public void setEnds(Point2D p1, Point2D p2);

  public Point2D getEnd1();

  public Point2D getEnd2();

  public void adjustEnds();

  public String getSourcePort();

  public String getDestinationPort();

  public void setSourcePort(String port);

  public void setDestinationPort(String port);

  public void setSourceConnector(Connector c);

  public Connector getSourceConnector();

  public void setDestinationConnector(Connector c);

  public Connector getDestinationConnector();

  public String getEdgeString();

  /**
   * Print the edge description to the provided stream.
   * 
   * @param out
   *        the output stream for writing the description.
   */
  public void printEdge(PrintWriter out);

}
